//
//  HttpConnect.h
//  MyFamework
//
//  Created by carlos on 12-10-3.
//  Copyright (c) 2012年 carlos. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ASIHTTPRequest/ASIHTTPRequest.h>
#import "ThreadMessage.h"
#import "HttpEnty.h"


@protocol HttpConnectDelegate;
@interface HttpConnect : NSObject

//单例模式
+ (HttpConnect *)instance;

//连接
- (void)connent:(HttpEnty *)httpEnty withThreadMessage:(ThreadMessage *)threadMessage;

//执行成功的回调函数
@property (nonatomic,assign) id<HttpConnectDelegate> delegate;
@end

@protocol HttpConnectDelegate <NSObject>
//连接成功
- (void)httpConnectSuccess:(NSString *)content withThreadMessage:(ThreadMessage *)threadMessage;
//连接失败
- (void)httpConnectFail:(NSError *)error withThreadMessage:(ThreadMessage *)threadMessage;

@end